From 348d4dd6806dcf081260ade7ad6f2131c927dc29 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 1 Jun 1993 03:33:40 +0000 Subject: [PATCH] (float_to_string): Skip `-' like digits when ensuring result looks like a float. --- src/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/print.c b/src/print.c index 381f43b4693..6075ea22210 100644 --- a/src/print.c +++ b/src/print.c @@ -653,7 +653,7 @@ float_to_string (buf, data) /* Make sure there is a decimal point with digit after, or an exponent, so that the value is readable as a float. */ for (cp = buf; *cp; cp++) - if (*cp < '0' || *cp > '9') + if ((*cp < '0' || *cp > '9') && *cp != '-') break; if (*cp == '.' && cp[1] == 0) -- 2.30.2